﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL;
using SAC.mySqlHelper;

namespace WFWH
{
    public partial class DataSend : Form
    {
        string sql = "";
        string repType = "日报";
        string repName = "综合报表";

        BLLRep br = new BLLRep();

        public DataSend()
        {
            InitializeComponent();

            this.timer1.Enabled = true;

            this.txtShow.AppendText("[" + DateTime.Now.ToLocalTime() + "]" + " 程序已启动......" + "\r\n");
        }

        //重发按钮
        private void btnSend_Click(object sender, EventArgs e)
        {
            //this.txtShow.AppendText("[" + DateTime.Now.ToString("yyyy-MM-dd H:mm:ss") + "]" + "重新发送 \r\n");

            //DataTable dt = br.RetTableByDayToMySql(repName, repType, DateTime.Parse(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd 0:00:00")));

            //if (dt != null && dt.Rows.Count > 0)
            //{
            //    for (int i = 0; i < dt.Rows.Count; i++)
            //    {
            //        sql = "";
            //    }
            //}

            //sql = "insert into 综合日报表_1 (指标名称,单位,设计值,1号机组,2号机组,全厂,写入时间) values ('test','test','test','test','test','test','test')";

            sql = "select * from 综合日报表_1";

            DataSet ds = SAC.mySqlHelper.MySql.ReturnDateSet(sql);

            int j = MySql.ReturnExeNoQuery(sql);

            //MySql1 mm = new MySql1();
            //mm.test();

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            //this.txtShow.AppendText("[" + DateTime.Now.ToString("yyyy-MM-dd H:mm:ss") + "]" + "\r\n");


        }


    }
}
